home *** CD-ROM | disk | FTP | other *** search
- ////////////////////////////////////////////////////////////////////////////////////////////
- //
- // PRODUCT: Norton Internet Security/Symantec Desktop Firewall
- //
- // NAME: wiz-Supervisor.js (Javascript file for wiz-Supervisor.HTM)
- //
- // Copyright (c) by Symantec Corporation. All rights reserved.
- //
- ////////////////////////////////////////////////////////////////////////////////////////////
-
- var g_OrignalSupervisorName;
-
- function OnTabOver()
- {
- // Last Control Tab over to the <back, next, close> button.
- var VK_TAB = 9;
- if (window.event.keyCode == VK_TAB)
- window.parent.frames("bottom",0).focus();
- }
-
- function OnLoad()
- {
- // Disable NextButton so user cannot constantly click next.
- window.parent.frames("bottom").NextB.disabled = true;
-
- AcctName.value = parent.UserManager.CurrentUser;
- g_OrignalSupervisorName = parent.UserManager.CurrentUser;
- AcctName.disabled = true;
- Pass.focus();
-
- // Enable NextButton
- window.parent.frames("bottom").NextB.disabled = false;
- }
-
- function Page_GoNext()
- {
-
- try
- {
- // Disable NextButton so user cannot constantly click next.
- window.parent.frames("bottom").NextB.disabled = true;
-
- // Make sure password and confirmation match
- if (Pass.value != PassB.value)
- {
- alert(StrID("ParentalProductivity_PasswordError"));
- window.parent.frames("bottom").NextB.disabled = false;
- return false;
- }
-
- // If password is empty, pass in empty string
- if(!Pass.value)
- {
- Pass.value = "";
- }
-
- if (!parent.UserManager.SetAdministratorPassword(AcctName.value, Pass.value))
- {
- // Password change failed, most probably the administrator account was deleted
- // so try creating a new account
- parent.UserManager.CreateAccount(AcctName.value, Pass.value, "3");
- }
-
- window.parent.frames("bottom").NextB.disabled = false;
- return true;
- }
- catch(err)
- {
- window.parent.frames("bottom").NextB.disabled = false;
- }
- }
-
- function Page_GoBack()
- {
- return true;
- }
-
- function OnKeyDownHandler()
- {
- // Last Control Tab over to the <back, next, close> button.
- var VK_ESCAPE = 27;
-
- if (window.event.keyCode == VK_ESCAPE)
- {
- // Escape key.. We want to exit out of the wizard..
- parent.window.navigate("res://closeme.xyz");
-
- }
- }
-